<div class="col-sm-12">
  <!-- BOX -->
  <div class="box clear" id='drug-tab-content'>
    <div class="box-body">
      <div class="row bottom-border-plan2">
        <div class="pull-left font20 {{if (eq chooseTabFlag "chooseTabOne") "bottom-border-template padding-bottom10 margin-bottom-f2" "pointer"}}" {{action 'chooseTab' "chooseTabOne" on="click"}}>
          日计划
        </div>
        <div class="pull-left font20 left26 {{if (eq chooseTabFlag "chooseTabTwo") "bottom-border-template padding-bottom10 margin-bottom-f2" "pointer"}}" {{action 'chooseTab' "chooseTabTwo" on="click"}}>
          周计划
        </div>
        <div class="pull-left font20 left26 {{if (eq chooseTabFlag "chooseTabThree") "bottom-border-template padding-bottom10 margin-bottom-f2" "pointer"}}" {{action 'chooseTab' "chooseTabThree" on="click"}}>
          月计划
        </div>
        <div class="pull-right  nopadding-right nopadding-left bottom5">
          {{#ui/mix-button class="user-btn pull-left font16" iconClass="fa-print" paddingBorder="padding4 border-1-plantem" text='打印'  clickAction="downloadPlan" downloadPlan="downloadPlan"}}
          {{/ui/mix-button}}
        </div>

        <div class="pull-right nopadding-left bottom5">
          {{#ui/mix-button class="user-btn pull-left font16" iconClass="fa fa-mail-reply" paddingBorder="padding4 border-1-plantem" text='重置'  clickAction="detailCancel" detailCancel="detailCancel"}}
          {{/ui/mix-button}}
        </div>
        <div class="pull-right nopadding-left bottom5">
          {{#ui/mix-button class="user-btn pull-left font16" iconClass="fa fa-check-circle-o" paddingBorder="padding4 border-1-plantem" text='明天生效'  clickAction="saveTomorrow" saveTomorrow="saveTomorrow"}}
          {{/ui/mix-button}}
        </div>
        <div class="pull-right nopadding-left bottom5">
          {{#ui/mix-button class="user-btn pull-left font16" iconClass="fa fa-check" paddingBorder="padding4 border-1-plantem" text='立即生效'  clickAction="saveToday" saveToday="saveToday"}}
          {{/ui/mix-button}}
        </div>
      </div>

        <div class="clear">
          <div class="pull-left top20 padding-bottom30 color999999 font14">
            请设置计划模板(此模板会作为后续所有周计划的参考)
          </div>
          {{#if curCustomer}}
          <div class="pull-right top20 line-height-30 nopadding-left font-black font16">
              <span class="right10 font20">{{curCustomer.name}}</span><span class="fontColor">{{curBed.room.floor.building.name}}{{curBed.room.floor.name}}:{{curBed.room.name}}-{{curBed.name}}</span>
          </div>
          {{/if}}
        </div>


        {{#if showLoadingImg}}
          <div class="center top20">
            <img class="" src="assets/images/logo/loading.gif" style="width:40px" alt="">
          </div>
        {{else}}


        {{#if curCustomer}}
        <!-- 如果是日项目 dayColor-->
          {{#if (eq chooseTabFlag "chooseTabOne")}}
            <div class="bottom5 line-height-30 clear" id="daySelect">
              {{#if dayServiceList}}
                <div class="clear" id="position_absolute">
                  {{#each dayServiceList as |service index|}}
                    <div id="{{concat 'day-service-loop-' index}}" class="bottom4 white_space dayHover pull-left font16 left8 pointer padding-0-5 border-radius5 {{if service.selected 'weekColor' ''}}" {{action 'setService' service 'day' on="click"}}>
                      <span>{{service.name}}</span><span>({{service.hasFrequency}}/{{service.frequency}})</span>
                    </div>
                  {{/each}}
                </div>
              {{else}}
                <div class="pull-left font16 left8">
                  无
                </div>
              {{/if}}

            </div>
          {{/if}}

          <!-- 如果是周项目 -->
          {{#if (eq chooseTabFlag "chooseTabTwo")}}
            <div class="bottom5 line-height-30 clear " id="weekSelect">
              {{#if weekServiceList}}
              <div class="clear" id="position_absoluteWeek">
              {{#each weekServiceList as |service index|}}
                <div id="{{concat 'week-service-loop-' index}}" class="bottom4 white_space weekHover pull-left font16 left8 pointer padding-0-5 border-radius5 {{if service.selected 'weekColor' ''}}" {{action 'setService' service 'week' on="click"}}>
                  <span>{{service.name}}</span><span>({{service.hasFrequency}}/{{service.frequency}})</span>
                </div>
              {{/each}}
            </div>
              {{else}}
                <div class="pull-left font16 left8">
                  无
                </div>
              {{/if}}
            </div>
          {{/if}}

          <!-- 如果是月项目 -->
          {{#if (eq chooseTabFlag "chooseTabThree")}}
            <div class="bottom5 line-height-30 clear " id="monthSelect">
              {{#if monthServiceList}}
              <div class="clear" id="position_absoluteMonth">
              {{#each monthServiceList as |service index|}}
                <div id="{{concat 'month-service-loop-' index}}" class="bottom4 white_space weekHover pull-left font16 left8 pointer padding-0-5 border-radius5 {{if service.selected 'weekColor' ''}}" {{action 'setService' service 'month' on="click"}}>
                  <span>{{service.name}}</span><span>({{service.hasFrequency}}/{{service.frequency}})</span>
                </div>
              {{/each}}
            </div>
              {{else}}
                <div class="pull-left font16 left8">
                  无
                </div>
              {{/if}}
            </div>

          {{/if}}

          {{#if curService}}
            <div class="col-sm-12 nopadding-left top10">
            {{#if (eq chooseTabFlag "chooseTabTwo")}}
              <!--周项目-->
              <div class="col-sm-1 nopadding-left width120">
                {{#each curService.dayList as |date|}}
                  <div class="pointer week-tab" >
                    <div class="bottom10 border-1-solid padding4 center {{if date.selected 'weekColor' ''}}" {{action "chooseWeek" date on="click"}}>
                      <span>{{date.week}}</span>
                      {{#if date.choosed}}
                        <span class="hasError">已选</span>
                      {{/if}}
                    </div>
                  </div>
                {{/each}}
              </div>

              {{#if curdate}}
                <div class="icon-tab col-sm-10">
                  {{#each curdate.serviceList as |date|}}
                    <div class="col-sm-2 nopadding-right pointer " >
                      <div class="bottom10 border-1-solid padding4 center {{if date.selected 'weekColor' ''}}" {{action "chooseTime" date on="click"}}>
                        <img src={{date.icon}} style="height:20px" />
                        <span>{{date.name}}</span>
                        <!-- {{#if date.selected}}
                        <span>已选</span>
                        {{/if}} -->
                        {{#if date.serviceFull}}
                        {{#callbusi/hints-tip hasArrow=true tipValue=tipValue }}
                        {{/callbusi/hints-tip}}
                        {{/if}}
                      </div>
                    </div>
                  {{/each}}
                </div>
              {{/if}}
            {{else if (eq chooseTabFlag "chooseTabOne")}}
              <!--日项目-->
              {{#each curService.dateList as |date|}}
                <div class="col-sm-2 nopadding-right pointer">
                  <div class="bottom10 border-1-solid padding4 center {{if date.selected 'weekColor' ''}}" {{action "chooseTime" date on="click"}}>
                    <img src={{date.icon}} style="height:20px" />
                    <span>{{date.name}}</span>
                    {{#if date.serviceFull}}
                    {{#callbusi/hints-tip hasArrow=true tipValue=tipValue }}
                    {{/callbusi/hints-tip}}
                    {{/if}}
                  </div>
                </div>
              {{/each}}
            {{else if (eq chooseTabFlag "chooseTabThree")}}
              <!--月项目-->
              <div class="col-sm-2 nopadding-left nopadding-right">
                {{#each curService.dayList as |date|}}
                  <div class="pointer week-tab pull-left width50B padding-0-5" >
                    <div class="bottom10 border-1-solid padding4 center {{if date.selected 'weekColor' ''}}" {{action "chooseWeek" date on="click"}}>
                      <span>{{date.month}}</span>
                      {{#if date.choosed}}
                        <span class="hasError">已选</span>
                      {{/if}}
                    </div>
                  </div>
                {{/each}}
              </div>

              {{#if curdate}}
                <div class="icon-tab col-sm-10">
                  {{#each curdate.serviceList as |date|}}
                    <div class="col-sm-2 nopadding-right pointer " >
                      <div class="bottom10 border-1-solid padding4 center {{if date.selected 'weekColor' ''}}" {{action "chooseTime" date on="click"}}>
                        <img src={{date.icon}} style="height:20px" />
                        <span>{{date.name}}</span>
                        <!-- {{#if date.selected}}
                        <span>已选</span>
                        {{/if}} -->
                        {{#if date.serviceFull}}
                        {{#callbusi/hints-tip hasArrow=true tipValue=tipValue }}
                        {{/callbusi/hints-tip}}
                        {{/if}}
                      </div>
                    </div>
                  {{/each}}
                </div>
              {{/if}}


            {{/if}}
            </div>
            <!-- <p class="user-add-btn">
              <div class="text-center padding-top30">
                  <p class="text-center user-add-btn padding-top10" style="display:inline-block;margin:0 auto!important ">
                  {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-check" disabled=isSubmit text='保存' clickAction="save" save="save"}}
                  {{/ui/mix-button}}
                  {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-mail-reply" disabled=isSubmit  text='重置'  clickAction="detailCancel" detailCancel="detailCancel" }}
                  {{/ui/mix-button}}
                  </p>
                  <p class="center top10">
                    重置按钮说明：只重置当次更改内容(未保存项)
                  </p>
              </div>
            </p> -->
        {{/if}}

      {{/if}}


      {{/if}}<!-- loadImg闭合if -->

    </div>
  </div>
  <!-- /BOX -->
</div>
<!--选择老人-->
{{#if editcustomer}}
{{#bs-modal body=false footer=false header=false closedAction=(action "exitCustomer")}}

{{#bs-modal-body}}
  <div class="col-sm-12">
    <div class="col-sm-12">
      <div class="col-sm-6 nopadding-left nopadding-right" style="line-height:30px;font-size:13px;">
        {{#power-select class="input-group-content" placeholder='姓名' options=customerList  selected=customer searchField="namePinyin"
        noMatchesMessage="没有相关内容"	allowClear=false onchange=(action "chooseCustomer" ) as |customer|}}
          {{customer.name}}
        {{/power-select}}
      </div>
    </div>
  </div>
{{/bs-modal-body}}
{{#bs-modal-footer class="user-add-btn"}}
{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="confirm" confirm="confirm" }}
{{/ui/mix-button}}
{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消' clickAction="exitCustomer" exitCustomer="exitCustomer"}}
{{/ui/mix-button}}
{{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}


{{#if downloadModel}}
{{#bs-modal body=false footer=false header=false closedAction="invitation"}}
  {{#bs-modal-header}}
    <h3 class="modal-title">护理计划预览</h3>
  {{/bs-modal-header}}
  {{#bs-modal-body}}
  <div class="">
    {{log "curCustomer::" curCustomer}}
    <div class="" style="max-height:600px;overflow-y:auto;padding:0 20px;clear:both;">
      <div class="box-body" id='look-drug'>
      <div name="printbegin">
      <div id="datatable1_wrapper" class="dataTables_wrapper form-inline look-drug-list" role="grid">
        <table id="datatable-plan" cellpadding="0" cellspacing="0" border="0" class="center datatable table table-bordered dataTable" aria-describedby="datatable1_info">
            <thead>
                <tr role="row" style="font-size:18px;line-height:28px;">
                    <th rowspan="1" colspan="3" width=""  class="center">{{curCustomer.name}}:{{curBed.room.floor.building.name}}{{curBed.room.floor.name}}:{{curBed.room.name}}-{{curBed.name}}</th>
                </tr>
            </thead>
            <tbody>
              <tr role="row" style="font-size:14px;line-height:16px;">
                <td rowspan="1" colspan="1" width="10%"  class="center">时间</td>
                <td rowspan="1" colspan="1" width="20%" class="center">护理项目</td>
                <td rowspan="1" colspan="1" width="70%" class="center">备注</td>
              </tr>
              {{#each customerPlanListDaySort as |item|}}
                <tr style="font-size:14px;line-height:16px;">
                  {{#if (gt item.rowspanFlag 0)}}
                    <td rowspan={{item.rowspanFlag}} width="10%" style="vertical-align:middle;">{{item.startTimeTab}}点</td>
                  {{/if}}
                    <td width="20%" style="vertical-align:middle;">{{item.item.item.name}}</td>
                    <td width="70%" style="vertical-align:middle;text-align:left;padding:3px 5px;">{{item.item.remark}}</td>
                </tr>
              {{/each}}
            </tbody>
        </table>
        </div>
        </div>
      </div>
    </div>
    <!-- /BOX -->
  </div>
  {{/bs-modal-body}}
  {{#bs-modal-footer class="user-add-btn"}}
    {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-print"  text='打印' clickAction="printImg" printImg="printImg"}}
    {{/ui/mix-button}}
    {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='返回' clickAction="invitation" invitation="invitation"}}
    {{/ui/mix-button}}
  {{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}
